import request from '@/utils/request'

// 查询分销商列表
export function listReseller(query) {
  return request({
    url: '/reseller/reseller/list',
    method: 'get',
    params: query
  })
}

// 查询分销商详细
export function getReseller(id) {
  return request({
    url: '/reseller/reseller/' + id,
    method: 'get'
  })
}

// 新增分销商
export function addReseller(data) {
  return request({
    url: '/reseller/reseller',
    method: 'post',
    data: data
  })
}

// 修改分销商
export function updateReseller(data) {
  return request({
    url: '/reseller/reseller',
    method: 'put',
    data: data
  })
}

// 删除分销商
export function delReseller(id) {
  return request({
    url: '/reseller/reseller/' + id,
    method: 'delete'
  })
}

// 新增分销商
export function submitReseller(data) {
  return request({
    url: '/reseller/reseller/submitReseller',
    method: 'post',
    data: data
  })
}
